<html><head><title>CreateRenderTexture</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CreateRenderTexture()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>CreateRenderTexture</b></font>(#Texture, CameraID, Width, Height [, Flags [, RenderTextureName$]])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Creates a new render texture. The camera associated to the texture will render its view directly 
on the texture, without being displayed on screen. This can be very useful to 
have objects which display a part of the scene (like a TV screen, a mirror etc). 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Texture</i></td>
<td width="90%"> 
A number to identify the new texture. <a href="../reference/purebasic_objects.html">#PB_Any</a> can 
be used to auto-generate this number. 

</td></tr>
<tr><td><i>CameraID</i></td>
<td> 
The ID of the camera to associate with the texture. This ID can be get with <a href="../camera/cameraid.html">CameraID()</a>. 

</td></tr>
<tr><td><i>Width</i></td>
<td> 
The width of the new texture (in pixels). 

</td></tr>
<tr><td><i>Height</i></td>
<td> 
The height of the new texture (in pixels). 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
The flags can be one of the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Texture_AutomaticUpdate</font>: the texture is updated at every <a href="../engine3d/renderworld.html">RenderWorld()</a> automatically (default)
  <font color="#924B72">#PB_Texture_ManualUpdate</font>:    the texture is not updated automatically, <a href="updaterendertexture.html">UpdateRenderTexture()</a> has to be called manually.
  <font color="#924B72">#PB_Texture_CameraViewPort</font>:  the camera viewport won't be removed, useful to still be able to do a capture from the camera.
</font></pre>

</td></tr>
<tr><td><i>RenderTextureName$ (optional)</i></td>
<td> 
The name of the new texture in the OGRE system. This allow to use this name in script to assign a shader 
to this texture. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns zero if the texture can't be created. If <a href="../reference/purebasic_objects.html">#PB_Any</a> is used 
as '#Texture' parameter, the new texture number is returned. 

</blockquote><p><b>Remarks</b></p><blockquote>

<a href="textureoutput.html">TextureOutput()</a> is not supported on rendered textures. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="updaterendertexture.html">UpdateRenderTexture()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=createcubemaptexture.html>CreateCubeMapTexture()</a> - <a href=index.html>Texture Index</a> - <a href=createtexture.html>CreateTexture()</a> ->

</body></html>